import Vue from 'vue'
import VueResource from 'vue-resource'

import app from './app.vue'
// import '../../static/styles/common.css'
// import '../../static/styles/again.css'
import router from './router'
import VueLazyload from 'vue-lazyload'
import { Swipe, SwipeItem } from 'vue-swipe'
import infiniteScroll from 'vue-infinite-scroll'

require('vue-swipe/dist/vue-swipe.css')

Vue.component('swipe', Swipe)
Vue.component('swipe-item', SwipeItem)

// 自己写了原生的有bug（待修改）
Vue.use(infiniteScroll)
Vue.use(VueResource)
Vue.use(VueLazyload, {
  preLoad: 1.3
  // error: 'dist/error.png',
  // loading: 'dist/loading.gif',
  // attempt: 1
})

const vm = new Vue({
  router,
  render: h => h(app)
})

vm.$mount('app')
